package cc.cc4414.cc03.sys.service.impl;

import cc.cc4414.cc03.sys.entity.Resource;
import cc.cc4414.cc03.sys.mapper.ResourceMapper;
import cc.cc4414.cc03.sys.service.IResourceService;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.stereotype.Service;

/**
 * <p>
 * 资源表 服务实现类
 * </p>
 *
 * @author cc
 * @since 2018-12-30
 */
@Service
public class ResourceServiceImpl extends ServiceImpl<ResourceMapper, Resource> implements IResourceService {

	@Override
	public List<Resource> listByOrderByUrlDesc() {
		Wrapper<Resource> queryWrapper = new QueryWrapper<Resource>().orderByDesc(Resource.URL);
		return baseMapper.selectList(queryWrapper);
	}

}
